<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- AUTHOR: Dakota -->
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      >
    <body>
        <ui:composition>
            <h:form id="exerciseSummary">
                <h:panelGrid columns="2" >
                    <h:outputText value="Total Score: " />
                    <h:outputText value="#{exerciseSummaryBean.totalScore}" />

                    <h:outputText value="Max Total Score: " />
                    <h:outputText value="#{exerciseSummaryBean.maxTotalScore}" />

                    <h:outputText value="Percentage: " />
                    <h:outputText value="#{exerciseSummaryBean.percentage} %" />

                    <h:outputText value="Exercises Assigned: " />
                    <h:outputText value="#{exerciseSummaryBean.numAssigned}" />
                </h:panelGrid>


                <p:fieldset legend="Exercise Summary" style=" margin-top: 50px">
                <p:dataTable id="assignTable" value="#{exerciseSummaryBean.exerciseSummary}" var="exercise">
                    <p:column headerText="Exercise Name" sortBy="#{exercise.username}">
                        <h:outputText value="#{exercise.username}" />
                    </p:column>
                    <p:column headerText="Due Date" sortBy="#{exercise.due}">
                        <h:outputText value="#{exercise.due}" />
                    </p:column>
                    <p:column headerText="Score" sortBy="#{exercise.score}">
                        <h:outputText value="#{exercise.score}" />
                    </p:column>
                    <p:column headerText="Max Score" sortBy="#{exercise.maxScore}">
                        <h:outputText value="#{exercise.maxScore}" />
                    </p:column>
                </p:dataTable>
                </p:fieldset>
            </h:form>
        </ui:composition>
    </body>
</html>

